#coding:utf_8
def is_url_local(arg):
    pass

class Project(object): 
    "Base class and factory."
    def __new__(cls, url):
        if is_url_local(url):
            return super(Project, cls).__new__(ProjectLocal, url)
        else:
            return super(Project, cls).__new__(ProjectRemote, url)
    def __init__(self, url):
        self.url = url
        
class ProjectLocal(Project):
    def do_something(self):
        pass
    
class ProjectRemote(Project):
    def do_something(self):
        pass